package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 材料在材料分组实体类
 *
 * @author 吴旭
 */
public class MaterialGroupMemberMaterialEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -7826963298257664733L;
    private Long MaterialId;
    private String MaterialNo;
    private Long GroupId;
    private String GroupName;
    private String GroupNo;
    private String Description;

    public String getGroupNo() {
        return GroupNo;
    }

    public void setGroupNo(String GroupNo) {
        this.GroupNo = GroupNo;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    public Long getMaterialId() {
        return MaterialId;
    }

    public void setMaterialId(Long MaterialId) {
        this.MaterialId = MaterialId;
    }

    public String getMaterialNo() {
        return MaterialNo;
    }

    public void setMaterialNo(String MaterialNo) {
        this.MaterialNo = MaterialNo;
    }

    public Long getGroupId() {
        return GroupId;
    }

    public void setGroupId(Long GroupId) {
        this.GroupId = GroupId;
    }

    public String getGroupName() {
        return GroupName;
    }

    public void setGroupName(String GroupName) {
        this.GroupName = GroupName;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof MaterialGroupMemberMaterialEntity)) {
            return false;
        }

        final MaterialGroupMemberMaterialEntity that = (MaterialGroupMemberMaterialEntity) o;

        return new EqualsBuilder()
                .append(this.getMaterialId(), that.getMaterialId())
                .append(this.getGroupId(), that.getGroupId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getGroupId().hashCode();
        result = 31 * result + this.getMaterialId().hashCode();
        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
